//#define _CRT_SECURE_NO_WARNINGS 1
//#include <stdio.h>
//#include <string.h>
#include"vector.h"
void test_vector1()
{
	v::vector<int> d1;
	d1.push_back(1);
	d1.push_back(2);
	d1.push_back(3);
	d1.push_back(4);
	d1.push_back(5);
	/*for (size_t i = 0; i < d1.size(); i++)
	{
		cout << d1[i];
	}
	cout << endl;*/
	for (auto ch : d1)
	{
		cout << ch;
	}
	cout << endl;
	d1.resize(2);
	for (auto ch : d1)
	{
		cout << ch;
	}
	cout << endl;
	cout << d1.size() << endl;
	d1.resize(6, 1);
	cout << d1.size() << endl;
	for (auto ch : d1)
	{
		cout << ch;
	}
	cout << endl;
}
void test_vector2()
{
	v::vector<int> a1;
	a1.push_back(1);
	a1.push_back(2);
	a1.push_back(3);
	a1.push_back(4);
	a1.push_back(5);
	a1.push_back(6);
	auto tmp = a1.begin();
	while (tmp != a1.end())
	{
		if (*tmp % 2 == 0)
		{
			a1.erase(tmp);
		}
		else
		{
			++tmp;
		}
	}
	for (auto ch : a1)
	{
		cout << ch;
	}
	cout << endl;
	//for (auto ch : a1)
	//{
	//	cout << ch;
	//}
	//cout << endl;
	//a1.erase(a1.end());
	//for (auto ch : a1)
	//{
	//	cout << ch;
	//}
	//cout << endl;
	////cout << a1.erase(a1.begin());
	//auto* b1 = a1.erase(a1.end());
	//cout << *b1 << endl;
	//a1.erase(a1.end());
	//for (auto ch : a1)
	//{
	//	cout << ch;
	//}
	//cout << endl;
}
int main()
{
	test_vector2();
	return 0;
}